package helloworld.dao;

import helloworld.model.Parking_lot;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by admin on 2017/3/4.
 */
public interface ParkingLotDao extends JpaRepository<Parking_lot, Integer> {
    @Query(value="SELECT a.* from parking_lot a where a.kind=:kind and a.flag=:flag limit 0,1",nativeQuery = true)
    Parking_lot getOneDoor(@Param("kind") String kind, @Param("flag") String flag);

}
